package cn.joeg.app.css.util.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@ApiModel(value = "话务Session", description = "同一通话务唯一")
public class CallSession implements Serializable {

    @ApiModelProperty("话务标识")
    private String sessionCode;
    @ApiModelProperty("当前业务号码")
    private String businessCode;
    @ApiModelProperty("业务号码级Session列表")
    private Map<String, BusinessCodeSession> businessCodeSessions = new HashMap<>();

    public BusinessCodeSession getCurrBusinessCodeSession() {
        return getBusinessCodeSessions().get(businessCode);
    }

    public static class BusinessCodeSession implements Serializable {
        @ApiModelProperty("业务号码")
        private String businessCode;
        @ApiModelProperty("客户姓名已认证")
        private boolean authedCustomerName;
        @ApiModelProperty("客户证件已认证")
        private boolean authedCustomerCredentials;
        @ApiModelProperty("客户地址已认证")
        private boolean authedCustomerAddress;
        @ApiModelProperty("客户其它已认证信息")
        private Map<String, Boolean> authedOthers = new HashMap<>();

        public String getBusinessCode() {
            return businessCode;
        }

        public void setBusinessCode(String businessCode) {
            this.businessCode = businessCode;
        }

        public boolean isAuthedCustomerName() {
            return authedCustomerName;
        }

        public void setAuthedCustomerName(boolean authedCustomerName) {
            this.authedCustomerName = authedCustomerName;
        }

        public boolean isAuthedCustomerCredentials() {
            return authedCustomerCredentials;
        }

        public void setAuthedCustomerCredentials(boolean authedCustomerCredentials) {
            this.authedCustomerCredentials = authedCustomerCredentials;
        }

        public boolean isAuthedCustomerAddress() {
            return authedCustomerAddress;
        }

        public void setAuthedCustomerAddress(boolean authedCustomerAddress) {
            this.authedCustomerAddress = authedCustomerAddress;
        }

        public Map<String, Boolean> getAuthedOthers() {
            return authedOthers;
        }

        public void setAuthedOthers(Map<String, Boolean> authedOthers) {
            this.authedOthers = authedOthers;
        }
    }

    public Map<String, BusinessCodeSession> getBusinessCodeSessions() {
        return businessCodeSessions;
    }

    public void setBusinessCodeSessions(Map<String, BusinessCodeSession> businessCodeSessions) {
        this.businessCodeSessions = businessCodeSessions;
    }

    public String getSessionCode() {
        return sessionCode;
    }

    public void setSessionCode(String sessionCode) {
        this.sessionCode = sessionCode;
    }

    public String getBusinessCode() {
        return businessCode;
    }

    public void setBusinessCode(String businessCode) {
        this.businessCode = businessCode;
    }

}
